package com.leyou.common.exceptions;

import com.leyou.common.enums.ExceptionEnum;
import lombok.Getter;

/**
 * @author jingfuu@163.com
 * @version v1.0
 * @date 2019/5/1 23:16
 * @description TODO
 **/
@Getter
public class LyException extends RuntimeException{
    private int status;
    public LyException(ExceptionEnum exceptionEnum, Throwable throwable) {
        super(exceptionEnum.getMessage(),throwable);
        this.status = exceptionEnum.getStatus();
    }

    public LyException(ExceptionEnum exceptionEnum) {
        super(exceptionEnum.getMessage());
        this.status = exceptionEnum.getStatus();
    }
}
